import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueJsx from "@vitejs/plugin-vue-jsx";
import { resolve } from 'path';

function pathResolve(dir: string) {
  return resolve(__dirname, ".", dir);
}

// https://vitejs.dev/config/
export default defineConfig({
  resolve: {
    alias: [
      {
        find: '@',
        replacement: pathResolve('./src') + '/'
      },
      {
        find: '#',
        replacement: pathResolve('types') + '/'
      }
    ],
  },
  plugins: [
    vue(),
    vueJsx()
  ],
})
